import { createApp } from 'vue'
import App from './App.vue'
import router from './router/index'
import elementPlus from './plugins/element-plus'
import { createPinia } from 'pinia'
import { registerStore } from '@/store'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
// 加载全局样式
import './styles/index.scss'
import { setupGlobDirectives } from '@/utils/directive'

const store = createPinia()
store.use(piniaPluginPersistedstate)

const app = createApp(App)
setupGlobDirectives(app)

app.use(router)
app.use(elementPlus)
app.use(store)
registerStore()
app.mount('#app')
